﻿<%@ Page Language="C#" %>

<%
    String username = Request["user"];
    DTO.NguoiDungDto user = BUS.NguoiDungBus.LayNguoiDungTheoTen(username);
    if (user != null)
    {
        if (user.TrangThai == "unactive")
        {
            user.TrangThai = "active";
            try
            {
                BUS.NguoiDungBus.CapnhatTrangThaiNguoiDung(user,"active");
                Response.Write("1");

            }
            catch (Exception ex)
            {

            }

        }
        else
        {
            Response.Write("0");
        }
    }
    else
    {
        Response.Write("-1");
    }
%>
